This invention relates generally to numerical control systems and more particularly to cutter radius compensation circuits therein.
A significant problem in any machining process which requires the use of a machine tool workhead with tool axis offset from the surface to be machined is the determination of the cutter radius compensation which must be programmed into the machine tool. When using, for example, a milling or grinding tool with radius R, the axis of that tool is offset from the line to be machined by that distance R, and programming of the machine tool to machine that line requires programming not only of the line to be machined, but also of the cutter radius compensation which is the X and Y axis components of tool axis offset R. If the line to be machined is parallel to the X or Y axis, the problem is simple; R must be added to or subtracted from the X or Y value defining the line, the sign being determined by the side of the workpiece from which the line is machined.
The situation is not so straightforward if the line lies at an angle .alpha. to the X axis where tan ##EQU1## and .DELTA. X and .DELTA.Y are the increments of displacement along the X and Y axes involved in tracing the line from a point of origin (X.sub.1, Y.sub.1) along the line to a point (X.sub.2, Y.sub.2). It can be shown, since the radius R of the tool is always at a right angle to the line being machined, that X.sup.2 +y.sup.2 = R.sup.2 where x and y are the X axis and Y axis components of the tool radius R. It can also be shown that ##EQU2## AND GIVEN THAT RELATIONSHIP, THE CUTTER RADIUS COMPENSATION CAN BE DETERMINED AS X AND Y, AND APPLIED TO THE WORKPIECE COORDINATES FOR PROGRAMMING THE MACHINE TOOL.
Such a determination of x and y requires the formation of the square N.sup.2 of various numbers N. Multiplying circuits to achieve such a squaring function are well-known. Such multiplying circuits are relatively complex, however. The subject invention herein disclosed provided a substantially simpler circuit for forming the square of a number, or the sum of the squares of two or more numbers, for comparing that square or sum of the squares with a known number, and for generating a signal in response thereto.